package com.itheima.AOP;

import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class Teacher {

    @Pointcut("execution(* *..*(..))")
    public void pt(){}
    @Before("pt()")
    public void before(){
        System.out.println("Before run....");
    }
    @After("pt()")
    public void after(){
        System.out.println("after run....");
    }
    @AfterReturning("pt()")
    public void afterReturning(){
        System.out.println("afterReturning run....");
    }
    @AfterThrowing("pt()")
    public void afterThrowing(){
        System.out.println("afterThrowing run....");
    }

}
